rm(list=ls(all=TRUE))
#
#
library(MASS)
library(foreign)
library(basicspace)
#
setwd("/Users/ssaiegh/Mac/Representation Gap/Paper PA")
#
data <- read.dta("peru.dta")
attach(data,warn.conflicts = FALSE)
#
T <- cbind(self,toledo,ollanta,k_fujimori,alianza_cambio,pap,solidaridad,fuerza_2011,gana_peru,peru_posible)
#
mode(T) <- "double"
colnames(T) <- c("SELF","TOLEDO","HUMALA","FUJIMORI","AGC","APRA","SOLIDARIDAD","FUERZA","GANA","POSIBLE")
#
#
result <-aldmck(T,polarity=3,respondent=1,missing=c(95,96,97,98,99),verbose=F)
#
